package com.blb.zycommunity.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.blb.zycommunity.entity.ZyOwner;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.security.core.GrantedAuthority;

import java.util.List;

/**
 * <p>
 * 业主  服务类
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
public interface IZyOwnerService extends IService<ZyOwner> {
    IPage<ZyOwner> findOwnerPage(Long current, Long size, String communityId, String ownerNickname, String ownerRealName, String ownerIdCard, String ownerPhoneNumber);

    List<ZyOwner> findAuditRecords(String ownerRealName);

    void register(ZyOwner zyOwner) throws Exception;

    /**
     * 根据用户名查询角色权限集合
     */
    List<GrantedAuthority> getAuthoritiesByNickname(String ownerNickname);

    /**
     * 根据用户名查询信息
     */
    ZyOwner findByNickname(String ownerNickname);

    List<ZyOwner> findRoomByNickname(String ownerNickname);

    List<ZyOwner> findCommunityIdByNickname (String ownerNickname);


    void updateOwnerPortrait(String ownerPortrait, String ownerId);

}
